// 静态路由 （谁都可以访问）
export const conRoutes = [
    {
        path: "/login",
        //@ts-ignore
        component: () => import("./login/index.vue"),
        name: "login",
        meta: {
            title: "登录",
            unhidden: false,
            icon: "Avatar",
        },
    },
    {
        path: "/",
        //@ts-ignore
        component: () => import("../layout/index.vue"),
        name: "layout",
        meta: {
            title: "",
            unhidden: true,
        },
        redirect: "/home",
        children: [
            {
                path: "/home",
                // @ts-ignore
                component: () => import("../routes/home/index.vue"),
                name: "home",
                meta: {
                    title: "首页",
                    unhidden: true,
                    icon: "House",
                },
            },
        ],
    },
    {
        // 数据大屏
        path: "/screen",
        // @ts-ignore
        component: () => import("../layout/menu/screen/index.vue"),
        name: "screen",
        meta: {
            title: "数据大屏",
            unhidden: true,
            icon: "Platform",
        },
    },
    {
        path: "/404",
        //@ts-ignore
        component: () => import("./404/index.vue"),
        name: "404",
        meta: {
            title: "404",
            unhidden: false,
            icon: "CircleCloseFilled",
        },
    },
];
// 异步路由 需要判断
export const asyncRoutes = [
    {
        // 权限
        path: "/permission",
        //@ts-ignore
        component: () => import("../layout/index.vue"),
        name: "Acl",
        meta: {
            title: "权限管理",
            unhidden: true,
            icon: "Lock",
        },
        redirect: "/permission/user",
        children: [
            {
                path: "/permission/user",
                // @ts-ignore
                component: () =>
                    import("../layout/menu/permission/user/index.vue"),
                name: "User",
                meta: {
                    title: "用户管理",
                    unhidden: true,
                    icon: "User",
                },
            },
            {
                path: "/permission/role",
                // @ts-ignore
                component: () =>
                    import("../layout/menu/permission/role/index.vue"),
                name: "Role",
                meta: {
                    title: "角色管理",
                    unhidden: true,
                    icon: "UserFilled",
                },
            },
            {
                path: "/permission/melas",
                //@ts-ignore
                component: () =>
                    import("../layout/menu/permission/melas/index.vue"),
                name: "Permission",
                meta: {
                    title: "菜单管理",
                    unhidden: true,
                    icon: "Monitor",
                },
            },
        ],
    },
    {
        path: "/shop",
        //@ts-ignore
        component: () => import("../layout/index.vue"),
        name: "Product",
        meta: {
            title: "菜单管理",
            unhidden: true,
            icon: "ShoppingBag",
        },
        redirect: "/shop/brand",
        children: [
            {
                path: "/shop/brand",
                // @ts-ignore
                component: () => import("../layout/menu/shop/brand/index.vue"),
                name: "Trademark",
                meta: {
                    title: "商品管理",
                    unhidden: true,
                    icon: "ShoppingBag",
                },
            },
            {
                path: "/shop/stats",
                //@ts-ignore
                component: () => import("../layout/menu/shop/stats/index.vue"),
                name: "Attr",
                meta: {
                    title: "属性管理",
                    unhidden: true,
                    icon: "ChromeFilled",
                },
            },
            {
                path: "/shop/spu",
                //@ts-ignore
                component: () => import("../layout/menu/shop/spu/index.vue"),
                name: "Spu",
                meta: {
                    title: "SPU管理",
                    unhidden: true,
                    icon: "Help",
                },
            },
            {
                path: "/shop/sku",
                //@ts-ignore
                component: () => import("../layout/menu/shop/sku/index.vue"),
                name: "Sku",
                meta: {
                    title: "SKU管理",
                    unhidden: true,
                    icon: "Baseball",
                },
            },
        ],
    },
];

// 任意路由
export const anyRoutes = [
    {
        path: "/:pathMatch(.*)*",
        redirect: "/404",
        name: "Any",
        meta: {
            title: "任意路由",
            unhidden: false,
            icon: "QuestionFilled",
        },
    },
];
